<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
require_once "$mosConfig_absolute_path/components/com_joomleague/joomleague.js.php";
if ($results_config['show_events']==1&&$results_config['use_tabs_events']==1) { HTML_joomleague::init_tabs(); }
?>
<!-- Header with Project Name-->
<div align="center" class="sectiontableheader"><a href="javascript:void(0)" onclick="switchMenu('p<?php echo $project->id;?>');">
<?php HTML_joomleague::show_matchdays_title(HTML_joomleague::showTitle($project, $overall_config['project_heading_type'])." - ", $rounds[$current_round-1]->id, $results_config); ?>
</a>&nbsp;<a href="<?php echo sefRelToAbs('index.php?option=com_joomleague&amp;p='.$project->id.'&amp;Itemid='.$Itemid);?>" style="font-size:9px">[&gt;&gt;&gt;]</a></div><br />
<!-- Header END -->
<div id="p<?php echo $project->id;?>" style="display:<?php echo $status;?>">
<table width="100%" align="center" cellspacing="0" cellpadding="0" style="padding:5px;"> 
  <tr>
    <?php if(!isset($joomleague->project_type) || $joomleague->project_type != 'SIMPLE_KO') { ?>
    <td width="60%" valign="top">
    <!-- ranking START -->
<?php

foreach ( $current_ranking as $key=>$cu_rk ) {
  if ($key) {
    echo '<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0"><tr><td class="contentheading">';
      HTML_joomleague::show_ranking_division_title($key);
    echo '</td></tr></table>';
  }
  ?>
  <table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
  <?php
  HTML_joomleague::show_ranking_heading($table_config);
  HTML_joomleague::show_ranking_entries($cu_rk, $previous_ranking[$key], array(), array(), $table_config);
  ?>
  </table><br/>
  <?php
}
?>
    <!-- ranking END -->
    </td>
    <?php } ?>
    <td style="width:10px">&nbsp;</td>
    <td valign="top">
    <table width="98%" align="center" border="0" cellpadding="0" cellspacing="0">
        <?php
        echo '<tr><td colspan="8"><a href="'.sefRelToAbs('index.php?option=com_joomleague&amp;p='.$project->id.'&amp;Itemid='.$Itemid.'&amp;func=showResults&amp;r='.$round).'"><b>'._JL_FRONTPAGE_CURRENT_MATCHDAY.'</b></a></td></tr>';
            HTML_joomleague::show_results($matches, $results_config);
        if (is_array($next_matches) && (count($next_matches)>0))
        {
            echo '<tr><td colspan="8"><a href="'.sefRelToAbs('index.php?option=com_joomleague&amp;p='.$project->id.'&amp;Itemid='.$Itemid.'&amp;func=showResults&amp;r='.($round+1)).'"><b>'._JL_FRONTPAGE_NEXT_MATCHDAY.'</b></a></td></tr>';
            HTML_joomleague::show_results($next_matches, $results_config);
        }
        else
        {
            echo '<tr><td colspan=4>&nbsp;<br/><b>'._JL_FRONTPAGE_NO_MORE_MATCHDAYS.'</b><br/>&nbsp;</td></tr>';
        }?>
    </table>
    </td>
  </tr>
</table>
</div>

